<?php

if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
require_once( "class_3d/CheckMode_3d.php" );
$gametype = intval(getvar("gametype"));
$chkGametype = chkGametype($gametype);
$chk = new CheckMode_3d($curruser['acl'], 1, $gametype);
$chk->checkShow3dPage();
$betname = judge_type($gametype);
unset($chk);
$tbl = $g_gametype_3d[$gametype]['en'];
$tblName = $g_gametype_3d[$gametype]['ch'];
if ($curruser['acl'] != "255")
{
    exit();
}
$ui = new UI_3D(true);
$tpl = new Template2();
$conf = new Config();
$cookie_name = "time3DCK" . $gametype;
$ui->header();
if (isset($_SESSION[$cookie_name]) && $_SESSION[$cookie_name] != "")
{
    $soundVal = $conf->get("alert_sound");
    $time = intval($_SESSION[$cookie_name]);
    $checkVal = $conf->get("max_bat_hint_{$tbl}") - 1;
    $lotto_id = intval(getvar("id"));
    if ($chkGametype == 3)
    {
        include( "class_5h/Bet_5h.php" );
        $Bet_3d = new Bet_5h($gametype);
    }
    else
    {
        include( "class_3d/Bet_3d.php" );
        $Bet_3d = new Bet_3d($gametype);
    }
    if (isset($_COOKIE["chksound3DCK" . $gametype]) && $_COOKIE["chksound3DCK" . $gametype] == "1")
    {
        echo "<bgsound src=\"image/dindin" . $soundVal . ".mp3\" loop=1 />";
    }
    echo "<table width=420 border=1 cellpadding=2 cellspacing=0>";
    echo "<caption class=\"bgImg_" . $gametype . "\">" . $tblName . " 大额注单警示</caption>";
    echo "<thead>";
    echo "<tr class=\"bgClc_" . $gametype . "\"><td nowrap>序号 / 时间</td><td nowrap>会员代号 / 名称</td><td nowrap>下注内容</td><td nowrap>赔率</td><td nowrap>金额</td></thead>";
    echo "<tbody>";
    $rs = $Bet_3d->getBigBetListRS($lotto_id, $checkVal, $time);
    while (!$rs->eof)
    {
        echo "<tr class=td2>";
        echo "<td nowrap><font color=#217952>" . $rs->f['id'] . "</font> &nbsp; " . date("m-d H:i:s", $rs->f['createtime']) . "</td>";
        echo "<td nowrap>" . $rs->f['account'] . " &nbsp; <font color=#217952>" . $rs->f['name'] . "</font></td>";
        $tempIdx = $rs->f['bettype'] . "_" . $rs->f['subid'];
        echo "<td nowrap>【" . $betname[$tempIdx] . "】&nbsp;" . nl2br($rs->f['line_nums']) . "</td>";
        echo "<td nowrap>" . floatval($rs->f['rate']) . "</td>";
        if (1999 < $rs->f['amount'])
        {
            $tempClass = "class=alert2";
        }
        else if (999 < $rs->f['amount'])
        {
            $tempClass = "class=alert1";
        }
        else
        {
            $tempClass = "";
        }
        echo "<td nowrap " . $tempClass . ">" . $rs->f['amount'] . "</td>";
        echo "</tr>";
        $rs->movenext();
    }
    echo "</tbody>";
    echo "<tfoot><tr align=right class=\"bgClc_" . $gametype . "\"><td colspan=5><input type=button value=\"&#12288;关&#12288;闭&#12288;\" onclick=\"window.close()\"></td></tr></tfoot></table>";
    echo "<script>";
    echo "$(function(){";
    echo "$(\"tbody>tr\").hover(";
    echo "function() {\$(this).addClass(\"trover\");}";
    echo ", function() {\$(this).removeClass(\"trover\");}";
    echo ");";
    echo "});";
    echo "setTimeout(\"window.close()\",12000);";
    echo "</script>  ";
    unset($_SESSION[$cookie_name]);
}
else
{
    echo "<script>window.close();</script>";
}
$ui->footer();
?>